#!/usr/bin/env python

# This is a comment. A comment starts with '#'.
# The python interpreter ignores comments.
# You can add additional explanations to your script by adding comments.

# Notice the '#!/usr/bin/env python' in line 1.
# Every script you create should have that as line 1.
# That line tells the computers operating system what program is
#   needed to run this script (in this case, python).

# Let's make some variables!
# A variable is a named location in the computer's memory (RAM).
# The value of a variable can be retrieved and used by referring to the
#    variable's name.

# Variables can hold integers.
# Use the assignment operator to set the value of a variable.
# '=' is the assignment operator
w = 0
x = 509
y = -23
z = -1234567

# Print writes to standard output (the terminal).
# Print the value of a variable by using 'print'.
print
print "Some integers..."
print "================"
print w
print x
print y
print z
# Print an empty line by typing 'print' by itself.
print
# You can get the type of data in a variable by using the 'type' function.
print "...and thier types..."
print type(w)
print type(x)
print type(y)
print type(z)
print
# You can get the memory address of a variable by using the 'id' function.
print "...and their memory addresses."
print id(w)
print id(x)
print id(y)
print id(z)
print
# Variables can hold floats.
# Use the assignment operator to set the value of a variable.
# '=' is the assignment operator.
a = 0.5
b = 3.14
c = -0.000003424
d = -123412341234.13421234123

# Print writes to standard output (the terminal).
# Print the value of a variable by using 'print'.
print
print "Some floats..."
print "=============="
print a
print b
print c
print d
print
# You can get the type of data in a variable by using the 'type' function.
print "...and their type..."
print type(a)
print type(b)
print type(c)
print type(d)
print
# You can get the memory address of a variable by using the 'id' function.
print "...and their memory addresses"
print id(a)
print id(b)
print id(c)
print id(d)
print

# Variables can hold strings.
# A string must be surrounded by quotation marks.
# There are 4 types of quotation marks:
#     single single quotes: 'hello'
#     single double quotes: "hello"
#     triple single quotes: '''hello'''
#     triple double quotes: """hello"""
# Triple quotes are for multi-line strings.
# Use the assignment operator to set the value of a variable.
# '=' is the assignment operator.
firstname = 'Nathan'
lastname = "Kieffer"
occupation = '''
teacher by day,
ninja by night,
dangerous 24/7.
'''
hobby = """
1. cycling
2. reading
3. eating fire
"""
# Print writes to standard output (the terminal).
# Print the value of a variable by using 'print'.
print
print "Some strings..."
print "=============="
print firstname
print lastname
print occupation
print hobby
print
# You can get the type of data in a variable by using the 'type' function.
print "...and their type..."
print type(firstname)
print type(lastname)
print type(occupation)
print type(hobby)
print
# You can get the memory address of a variable by using the 'id' function.
print "...and their memory addresses"
print id(firstname)
print id(lastname)
print id(occupation)
print id(hobby)
print

# You can also print more than one piece of data at a time.
print "Print lots of things!!"
print "======================"
print type(w), id(w), ": w = ", w
print type(x), id(x), ": x = ", x
print type(y), id(y), ": y = ", y
print type(z), id(z), ": z = ", z
print type(a), id(a), ": a = ", a
print type(b), id(b), ": b = ", b
print type(c), id(c), ": c = ", c
print type(d), id(d), ": d = ", d
print type(firstname), id(firstname), ": firstname = ", firstname
print type(lastname), id(lastname), ": lastname = ", lastname
print type(occupation), id(occupation), ": occupation = ", occupation
print type(hobby), id(hobby), ": hobby = ", hobby

print
print "What changes in the output when you run the script again?"
print "What stays the same when you run the script again?"

print
